Component({
  externalClasses: ['custom-class'],
  properties: {
    keyword: {
      type: String,
      value: '',
    },
    placeholder: {
      type: String,
      value: '搜索',
    },
    isEmpty: {
      type: Boolean,
      value: true,
    },
  },
  methods: {
    onInput(e) {
      let keywords = e.detail.value;
      this.triggerEvent('input', {
        value: keywords,
      }, {});
    },
    onSearch(e) {
      this.triggerEvent('confirm', {}, {});
    },
    clearTxt() {
      this.triggerEvent('clearTxt', {}, {});
    }
  },
});
